|
![](/i/fill.gif) |
Kevin Loney <klo### [at] pt2m com> wrote:
> #local Normal = Normal + <(P.z+C.z)*(P.y-C.y), (P.x+C.x)*(P.z-C.z),
> (P.y+C.y)*(P.x-C.x)>;
I think that there might be a problem with the '+' operations there
(don't they need to be '-'?). To avoid any typing mistakes and to
optimize/simplify the code, you can write it like this:
#local Normal = Normal + vcross(P,C);
However, what I wonder is if this can work. Some of the normals will
point to one side of the "plane" and others will point to the other.
Their sum can point virtually anywhere, depending on the arrangement of
the points.
If the points were sorted in clockwise (or the anti-clockwise) order,
then it will probably ok.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |